package org.example.DesignPatterns.Flyweight;

import java.util.Map;

/**
 * @description:
 * @author: farprt
 * @create: 2022-09-18 14:54
 **/
public class RiverFactory extends Factory{


    public RiverFactory() {
        super();
    }

    @Override
    public Drawable create(String image) {
        if(!images.containsKey(image)){
            images.put(image,new River());
        }
        return images.get(image);
    }
}